package com.dongzili.common.task.utils;

import lombok.Getter;

@Getter
public enum WeekEnum {
 
    SECONDS("1", "星期天", "Sunday "), MONDAY("2", "星期一", "Monday "), TUESDAY("3", "星期二", "Tuesday "), WEDNESDAY("4",
 
            "星期三", "Wednesday "), THURSDAY("5", "星期四",
 
            "Thursday "), FRIDAY("6", "星期五", "Friday "), SATURDAY("7", "星期六", "Saturday ");
 
 
 
    private final String key;
 
    private final String nameCn;
 
    private final String nameEn;
 
 
 
    WeekEnum(String key, String nameCn, String nameEn) {
 
        this.key = key;
 
        this.nameCn = nameCn;
 
        this.nameEn = nameEn;
 
    }
 
 
 
    public static String matchNameCn(String code) {
 
        for (WeekEnum m : WeekEnum.values()) {
 
            if (m.getKey().equals(code)) {
 
                return m.getNameCn();
 
            }
 
        }
 
        return "";
 
    }
 
 
 
    public static String matchNameEn(String code) {
 
        for (WeekEnum m : WeekEnum.values()) {
 
            if (m.getKey().equals(code)) {
 
                return m.getNameEn();
 
            }
 
        }
 
        return "";
 
    }


}